package org.csdn.titan.utils

import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

object SparkUtils {

  def getSparkSession(appName:String = "app",master:String="local[*]",confMap:Map[String,String]=Map.empty):SparkSession = {

    val conf = new SparkConf().setAll(confMap)
    SparkSession.builder()
      .appName(appName)
      .master(master)
      .config(conf)
      .getOrCreate()


  }

}
